/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Modelos;

import Entidades.TipoEscaner;
import java.util.List;
import javax.swing.DefaultComboBoxModel;

/**
 *
 * @author diego
 */
public class ModeloComboTipoEscaner extends DefaultComboBoxModel {

    public void addElement(List<TipoEscaner> tipo) {
        super.addElement("Seleccione tipo de escaner");
        for (TipoEscaner ltipo : tipo) {
            super.addElement(ltipo); //To change body of generated methods, choose Tools | Templates.
        }
    }

    @Override
    public Object getSelectedItem() {
        if (super.getSelectedItem() instanceof String) {
            return "Seleccione tipo de escaner";
        }
        return (TipoEscaner) super.getSelectedItem(); //To change body of generated methods, choose Tools | Templates.
    }
}
